import React from 'react'
import {Outlet ,useNavigate} from 'react-router-dom'

export default function Home() {

    //编程式路由导航
    //useNavigate()里面式跳转的路由字符串
    const navigate = useNavigate()
    const toMusicHandle=()=>{
        navigate('/Main/Home/Music?user=尹伟&age=18')
    }
    const toNewHandle=()=>{
        navigate('/Main/Home/New?user=尹伟&age=18')
    }
  return (
    <div>
        <h3>我是Home的内容</h3>
        <button onClick={toMusicHandle}>Music</button>
        <button onClick={toNewHandle}>New</button>
        <Outlet />
    </div>
  )
}
